﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;

namespace COC_helper
{
    public partial class NoteBook : Form
    {
        public NoteBook()
        {
            InitializeComponent();
        }

        private void NoteBook_FormClosing(object sender, FormClosingEventArgs e)
        {
            Global_Value.zmb_Setting.MyNoteBox = textBox1.Text;
            //try
            //{
            //    File.WriteAllText(Global_Value.ZMB_PATH + textBox2.Text, textBox1.Text);
            //}
            //catch (Exception)
            //{

            //    return;
            //}
           
        }

        private void NoteBook_Shown(object sender, EventArgs e)
        {
            textBox1.Text = Global_Value.zmb_Setting.MyNoteBox;
            //try
            //{
            //   string temp =  File.ReadAllText(Global_Value.ZMB_PATH + textBox2.Text);
            //    textBox1.Text = temp; 
            //}
            //catch (Exception)
            //{
            //    Debug.Write("文件不存在或被占用");
            //    return;
          
            //}
        }
    }
}
